<%@ page language="java" isELIgnored="false" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="net.sf.json.JSONObject"%>
<%@page import="com.cmwa.solution.utils.SessionUtils"%>
<%@page import="com.cmwa.solution.utils.Utils"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String context = request.getContextPath();
	context = context.equals("/") ? context : context + "/";
	String currentId = SessionUtils.getEmployee().getID();
	String currentName = SessionUtils.getEmployee().getName();
%>
<%@ taglib uri="/wasp-tags" prefix="wasp"%>
<script type="text/javascript">
    var PATH = <%=context%>;
    var current_name = '<%=currentName%>';
	var resourceIdValue = '${param.resourceId}';
	var resourceSignValue = '${param.resourceSign}';
	var resourceSignModuleValue = '${param.resourceSignModule}';
	var attachList = '${param.attachList}';
	var extraList = '${param.extraList}';
	var columns = '${param.columns}';
	var isShow = '${param.isShow}';
	var isHidden = '${param.isHidden}';
	var loopHidInputParams = '${param.loopHidInputParams}';
	var uploadHidInputParams = '${param.uploadHidInputParams}';
	var modifyButtonParam = '${param.modifyButton}';
	var showStarIconParam = '${param.showStarIcon}';
	var isPermission = '${param.hasPermission}';
	var resourceModuleId = '${param.resourceModuleId}';
	var resourceModuleType = '${param.resourceModuleType}';
	var module = '${param.module}';
	var hidAttIdField = '${param.hidAttIdField}';
	var hidAttNameField = '${param.hidAttNameField}';
	var checkbox = '${param.checkbox}';
	var file = '${param.file}';
	var defaultPermission = '${param.hasPermission}';
	var checkBoxTmplt = '${param.checkBoxTmplt}';
	var hasExpandField = '${param.hasExpandField}';
	var hasExpandList = '${param.hasExpandList}';
	var isOperable = '${param.isOperable}';

	var hasPermission = false;
	<wasp:hasPermission id="${param.hasPermission}">
	hasPermission = true;
	</wasp:hasPermission>

	var tmp = {
		module : module,
		resourceIdValue : resourceIdValue,
		resourceSignValue : resourceSignValue,
		resourceSignModuleValue : resourceSignModuleValue,
		attachList : attachList,
		extraList : extraList,
		columns : columns,
		isShow : isShow,
		isHidden : isHidden,
		loopHidInputParams : loopHidInputParams,
		uploadHidInputParams : uploadHidInputParams,
		modifyButtonParam : modifyButtonParam,
		showStarIconParam : showStarIconParam,
		isPermission : isPermission,
		resourceModuleId : resourceModuleId,
		resourceModuleType : resourceModuleType,
		hasPermission : hasPermission,
		hidAttIdField : hidAttIdField,
		hidAttNameField : hidAttNameField,
		defaultPermission : defaultPermission,
		file : file,
		checkbox : checkbox,
		checkBoxTmplt : checkBoxTmplt,
		hasExpandField : hasExpandField,
		hasExpandList : hasExpandList,
		isOperable : isOperable
	};

	if (!window.attArr) {
		window.attArr = [];
	}

	window.attArr.push(tmp);

</script>

<script type="text/javascript" src="<%=context%>resources/modules/system/common/multi.upload.js?r=<%=Math.random()%>"></script>
<script type="text/javascript" src="<%=context%>resources/modules/system/base/attachView.js?r=<%=Math.random()%>"></script>
<!-- 附件展示 -->
<div class="model">
	<table class="table attachFileContainer" id="attachContainer">
		<colgroup></colgroup>
		<tr>
			<td colspan="1" style="border-top:0;font-weight:bolder;padding: 0 2px;">
			        附件列表
			</td>
			<td colspan="4" class="tipsTd" style="border-top: 0;padding: 0 2px;">
				<span class="attachUploadWidget file-upload-file-name-area" style="color: red;">温馨提醒：上传单个附件大小不能超过30M；对附件进行新增操作，都需要点击保存才能生效。</span>
			</td>
			<td class="attachUploadWidget" colspan="1" style="border-top: 0;padding: 0 2px;">
				<button type="button" class="btn btn-primary pull-right" name="btnCopyProject" id="attach-file-upload">上传附件</button>
			</td>
		</tr>
		<tr class="attachTitle"></tr>
	</table>
	<input id='attIds' name='attIds' type='hidden' />
	<input id='attDelIds' name='attDelIds' type='hidden' />
</div>
